FROM python:3.13-slim

RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install fastapi
RUN pip install uvicorn

RUN cat <<EOF >  /etc/apt/sources.list
deb http://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free non-free-firmware
EOF


WORKDIR /root
COPY . .
EXPOSE 80
CMD ["python", "main.py"]